var express=require("express");
var pool=require("../pool.js");
let router=express.Router();
// 商品接口
router.get('/shop/:store_shop',(req,res)=>{
  var sql="select * from xhy_product where store_shop=?";
  pool.query(sql,[req.params.store_shop],(err,result)=>{
    if(err) throw err;
    res.json(result);
  })
})
// 商家接口
router.get('/store/:name_store',(req,res)=>{
  var sql="select * from xhy_store where name_store=?";
  pool.query(sql,[req.params.name_store],(err,result)=>{
    if(err) throw err;
    res.json(result);
  })
})


module.exports = router;